<?php
namespace App\Traits;

use App\Models\FakeDetail;
use App\Models\FakeList;
use App\Models\Parking;
use Illuminate\Http\Request;

Trait Trait15_16 {

    public function parkingStatus(Request $request)
    {
        $val = $request->validate([
            'floor_id' => 'required|integer'
        ]);
        $data = Parking::where(['floor_id' => $val['floor_id']])->get();
        $responseJson = [
            'code' => 200,
            'message' => '',
            'data' => $data
        ];
        return response()->json($responseJson);
    }

}
